Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: statefulsets, daemonsets, jobs and volumes implementation in k8s infra monitoring #6629

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

amlannandy
Copy link
Member

@amlannandy amlannandy commented Dec 13, 2024

Summary

implements statefulsets, daemonsets, jobs and volumes entities in infra monitoring

  • list table
  • detail view

Related Issues / PR's

N/A

Screenshots

Screenshot 2025-01-14 at 10 59 13 PM

Affected Areas and Manually Tested Areas

Infra Monitoring section


Important

Add support for monitoring statefulsets, daemonsets, jobs, and volumes in Kubernetes infrastructure, including API endpoints, UI components, and query hooks.

  • Features:
    • Implement statefulsets, daemonsets, jobs, and volumes in Kubernetes infrastructure monitoring.
    • Add list and detail views for each entity.
  • API:
    • Add getK8sDaemonSetsList, getK8sJobsList, getK8sStatefulSetsList, and getK8sVolumesList functions.
  • UI Components:
    • Add K8sDaemonSetsList, K8sJobsList, K8sStatefulSetsList, and K8sVolumesList components.
    • Add detail components: DaemonSetDetails, JobDetails, StatefulSetDetails, and VolumeDetails.
  • Hooks:
    • Add useGetK8sDaemonSetsList, useGetK8sJobsList, useGetK8sStatefulSetsList, and useGetK8sVolumesList hooks.
  • Constants:
    • Update K8sCategory and K8sEntityToAggregateAttributeMapping to include new entities.
    • Add quick filter configurations for new entities in constants.ts.

This description was created by Ellipsis for 6d17b16. It will automatically update as commits are pushed.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the enhancement New feature or request label Dec 13, 2024
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-nodes branch 5 times, most recently from b5d57e1 to ba944d0 Compare December 24, 2024 06:53
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-nodes branch from 186f768 to 6d441f3 Compare December 27, 2024 04:04
Base automatically changed from feat/infra-monitoring-k8s-nodes to feat/infra-monitoring-k8s January 3, 2025 06:09
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s branch from c89ffab to 79cae2d Compare January 3, 2025 06:14
@YounixM YounixM force-pushed the feat/infra-monitoring-k8s branch from a294614 to 6855009 Compare January 6, 2025 05:56
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s branch from 2edb730 to 579c7cb Compare January 8, 2025 05:21
@YounixM YounixM force-pushed the feat/infra-monitoring-k8s branch from 579c7cb to 22a33e3 Compare January 8, 2025 10:32
Base automatically changed from feat/infra-monitoring-k8s to main January 8, 2025 10:43
@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-jobs branch from a9011ac to 152b1b9 Compare January 14, 2025 17:28
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@amlannandy amlannandy changed the title feat: implement jobs list table for infra monitoring feat: jobs implementation in k8s infra monitoring Jan 14, 2025
@amlannandy amlannandy marked this pull request as ready for review January 14, 2025 17:30
@amlannandy amlannandy requested a review from YounixM as a code owner January 14, 2025 17:30
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

1 similar comment
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 152b1b9 in 2 minutes and 7 seconds

More details
  • Looked at 4611 lines of code in 33 files
  • Skipped 0 files when reviewing.
  • Skipped posting 9 drafted comments based on config settings.
1. frontend/src/api/infraMonitoring/getK8sJobsList.ts:70
  • Draft comment:
    Consider adding more robust error handling for network errors or unexpected responses to improve reliability.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function getK8sJobsList is used to fetch data, but the error handling is not robust. It should handle network errors or unexpected responses more gracefully.
2. frontend/src/container/InfraMonitoringK8s/Jobs/K8sJobsList.tsx:301
  • Draft comment:
    Consider defining expandedRowRender outside the component or using useCallback to prevent unnecessary re-renders.
  • Reason this comment was not posted:
    Confidence changes required: 40%
    The expandedRowRender function is defined within the K8sJobsList component, which could lead to unnecessary re-renders. It would be better to define it outside the component or use useCallback to memoize it.
3. frontend/src/container/InfraMonitoringK8s/Jobs/K8sJobsList.tsx:222
  • Draft comment:
    Ensure setCurrentPage and setOrderBy are included in the dependency array of useCallback for handleTableChange.
  • Reason this comment was not posted:
    Confidence changes required: 30%
    The handleTableChange function is defined using useCallback, which is good for performance. However, it should include setCurrentPage and setOrderBy in its dependency array to ensure it always has the latest references.
4. frontend/src/container/InfraMonitoringK8s/Jobs/K8sJobsList.tsx:397
  • Draft comment:
    Include setGroupBy and setExpandedRowKeys in the dependency array of useCallback for handleGroupByChange.
  • Reason this comment was not posted:
    Confidence changes required: 30%
    The handleGroupByChange function uses useCallback but does not include setGroupBy and setExpandedRowKeys in its dependency array. This could lead to stale closures.
5. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/Logs/JobLogsDetailedView.tsx:66
  • Draft comment:
    Avoid using inline styles. Use external stylesheets or styled components instead. This applies to other instances in this file as well.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
6. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/Metrics/JobMetrics.tsx:100
  • Draft comment:
    Avoid using inline styles. Use external stylesheets or styled components instead. This applies to other instances in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.
7. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/Traces/JobTraces.tsx:165
  • Draft comment:
    Avoid using inline styles. Use external stylesheets or styled components instead. This applies to other instances in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.
8. frontend/src/container/InfraMonitoringK8s/Jobs/K8sJobsList.tsx:304
  • Draft comment:
    Avoid using inline styles. Use external stylesheets or styled components instead. This applies to other instances in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.
9. frontend/src/container/InfraMonitoringK8s/Jobs/utils.tsx:274
  • Draft comment:
    Avoid using inline styles. Use external stylesheets or styled components instead. This applies to other instances in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_FuMuXRAIAnmIM4cN


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@amlannandy amlannandy changed the title feat: jobs implementation in k8s infra monitoring feat: statefulsets, daemonsets, jobs implementation in k8s infra monitoring Jan 21, 2025
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@amlannandy amlannandy requested a review from a team as a code owner January 21, 2025 12:13
@CLAassistant
Copy link

CLAassistant commented Jan 21, 2025

CLA assistant check
All committers have signed the CLA.

@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-jobs branch from 8db8062 to 5ca6a1f Compare January 22, 2025 06:20
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 41281c9 in 52 seconds

More details
  • Looked at 1667 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/Nodes/NodeDetails/constants.ts:657
  • Draft comment:
    The 'disabled' property is set to 'true' for this query data. Ensure this is intentional. This is also applicable at lines 700, 743, 832, 875, 918, 1525, and 1568.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code contains multiple instances where the 'disabled' property is set to 'true' for query data. This might be intentional, but it's worth pointing out in case it's an oversight.
2. frontend/src/container/InfraMonitoringK8s/Nodes/NodeDetails/constants.ts:102
  • Draft comment:
    The 'reduceTo' property is set to 'avg'. Ensure this is intentional. This is also applicable at lines 145, 188, 231, 273, 349, 393, 436, 479, 521, 564, 607, 859, 902, 945, 1028, 1127, 1220, 1313, 1389, 1432, 1475, 1551, and 1594.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code has multiple instances where the 'reduceTo' property is set to 'avg'. This might be intentional, but it's worth pointing out in case it's an oversight.
3. frontend/src/container/InfraMonitoringK8s/Nodes/NodeDetails/constants.ts:103
  • Draft comment:
    The 'spaceAggregation' property is set to 'sum'. Ensure this is intentional. This is also applicable at lines 146, 189, 232, 274, 350, 394, 437, 480, 522, 565, 608, 860, 903, 946, 1029, 1128, 1221, 1314, 1390, 1433, 1476, 1552, and 1595.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code has multiple instances where the 'spaceAggregation' property is set to 'sum'. This might be intentional, but it's worth pointing out in case it's an oversight.
4. frontend/src/container/InfraMonitoringK8s/InfraMonitoringK8s.tsx:107
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable to other imports in this file as well.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.
5. frontend/src/container/InfraMonitoringK8s/InfraMonitoringK8s.tsx:359
  • Draft comment:
    Avoid using the component/index.tsx file structure approach, as it makes it difficult to debug and find components using global search tools like VS Code. This is applicable to other imports in this file as well.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_ODM3Sqwi6pM1HKpa


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@amlannandy amlannandy force-pushed the feat/infra-monitoring-k8s-jobs branch from 6d17b16 to 4c1d8d7 Compare January 25, 2025 09:25
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 6d17b16 in 1 minute and 27 seconds

More details
  • Looked at 1109 lines of code in 12 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/constants.ts:73
  • Draft comment:
    The import path for K8sStatefulSetsData seems incorrect. It should be import { K8sStatefulSetsData } from 'api/infraMonitoring/getK8sStatefulSetsList'; instead of getsK8sStatefulSetsList.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.
2. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/JobDetails.tsx:89
  • Draft comment:
    The filter keys in handleChangeLogFilters and handleChangeTracesFilters are incorrect. They should use QUERY_KEYS.K8S_JOB_NAME instead of QUERY_KEYS.K8S_STATEFUL_SET_NAME.
  • Reason this comment was not posted:
    Comment was on unchanged code.
3. frontend/src/container/InfraMonitoringK8s/DaemonSets/DaemonSetDetails/DaemonSetDetails.tsx:135
  • Draft comment:
    The value for the k8s.object.kind filter should be DaemonSet instead of Daemonset.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
4. frontend/src/container/InfraMonitoringK8s/StatefulSets/StatefulSetDetails/StatefulSetDetails.tsx:138
  • Draft comment:
    The value for the k8s.object.kind filter should be StatefulSet instead of Statefulset.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
5. frontend/src/container/InfraMonitoringK8s/Jobs/JobDetails/JobDetails.tsx:414
  • Draft comment:
    Avoid using inline styles in React components. Use external stylesheets, CSS classes, or styled components instead. This issue is also present in other files like DaemonSetDetails.tsx, StatefulSetDetails.tsx, and VolumeDetails.tsx.
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_siLDWTp7YDMAhgD1


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs not required enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants